import threading
import time
from queue import Queue
def job(l,q):
    for i in range(len (l)):
        l[i] =l[i] ** 2
    q.put(l)

def multithreading():
    q = Queue() #在这里放入返回值
    threads =[] #把所有线程放入这个列表当中
    data = [[1,2,3],[3,4,5],[4,4,4],[5,5,5]]
    for i in range(4):
        t = threading.Thread(target=job,args=(data[i],q))  #设定线程
        t.start()
        threads.append(t) #全部加载到线程列表里

    for thread in threads:
        thread.join()

    results = []
    for _ in range(4):
        results.append(q.get())
    print (results)

if __name__ == "__main__":
    multithreading()